﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace MiniTools.App
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void btn_str_conct_Click(object sender, EventArgs e)
        {
            var str1 = richTextBox1.Text;

            var str2 = richTextBox2.Text;

            string[] oldArr = str1.Split(new string[] {"\n"}, StringSplitOptions.None);

            var str=new StringBuilder();

            str.Append("var str;\r\n");
            foreach (string item in oldArr)
            {
                str.Append("str += \"" + item.Replace("\"", "\\\"").Replace("  ", "").Replace("	","") + "\" ;\r\n");
            }
            richTextBox2.Text = str.ToString();
        }
    }
}
